// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 创建管理员（需要管理员权限） POST /api/Auth/create-admin */
export async function postAuthCreateAdmin(
  body: API.AdminCreateRequest,
  options?: { [key: string]: any }
) {
  return request<API.AdminCreateResult>("/api/Auth/create-admin", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 管理员登录 POST /api/Auth/login */
export async function postAuthLogin(
  body: API.AdminLoginRequest,
  options?: { [key: string]: any }
) {
  return request<API.AdminLoginResult>("/api/Auth/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取当前用户信息 GET /api/Auth/profile */
export async function getAuthProfile(options?: { [key: string]: any }) {
  return request<API.AdminDto>("/api/Auth/profile", {
    method: "GET",
    ...(options || {}),
  });
}

/** 测试认证 GET /api/Auth/test */
export async function getAuthTest(options?: { [key: string]: any }) {
  return request<any>("/api/Auth/test", {
    method: "GET",
    ...(options || {}),
  });
}
